/*
Java source file
Copyright: Umschalt.com 2012
*/
package com.david.documentation.web.view;

public class DokuUtils {

	public static String markSearchString(String search, String text){
		String searchWords[] = search.split(" ");
		String tmp = text;
		for (String temp : searchWords){
			if (text.toLowerCase().contains(temp.toLowerCase())){
				tmp = text.replaceAll("(?i)" + temp, "<em>" + temp + "</em>");
			}
		}
		return tmp;
	}

}
